<?php

/**
 * TODO: describe class 'swzz_Department'
 *
 * @package swzz
 */
class swzz_Department
{

    // ---- PROPERTIES ----

    /**
     * Id Działu Firmy
     * 
     * @var 
     *
     * @orm 
     */
    public $departmentId;

    /**
     * Nazwa Działu
     * 
     * @var 
     *
     * @orm 
     */
    public $departmentName;

    /**
     * limit Wydatków działu
     * 
     * @var 
     *
     * @orm 
     */
    public $limitDepartmentPurchases;

    /**
     * TODO: describe property 'employees'
     *
     * @var array of swzz_Employee
     *
     * @orm has many swzz_Employee inverse(department)
     */
    public $employees;

    // ---- METHODS ----

    /**
     * TODO: describe method '__construct'
     *
     */
    public function __construct() {
    }

    /**
     * TODO: describe method 'getDepartmentId'
     *
     */
    public function getDepartmentId() {
        return $this->departmentId;
    }

    /**
     * TODO: describe method 'setDepartmentId'
     *
     * @param  $departmentId 
     */
    public function setDepartmentId($departmentId) {
        $this->departmentId = $departmentId;
    }

    /**
     * TODO: describe method 'getDepartmentName'
     *
     */
    public function getDepartmentName() {
        return $this->departmentName;
    }

    /**
     * TODO: describe method 'setDepartmentName'
     *
     * @param  $departmentName 
     */
    public function setDepartmentName($departmentName) {
        $this->departmentName = $departmentName;
    }

    /**
     * TODO: describe method 'getLimitDepartmentPurchases'
     *
     */
    public function getLimitDepartmentPurchases() {
        return $this->limitDepartmentPurchases;
    }

    /**
     * TODO: describe method 'setLimitDepartmentPurchases'
     *
     * @param  $limitDepartmentPurchases 
     */
    public function setLimitDepartmentPurchases($limitDepartmentPurchases) {
        $this->limitDepartmentPurchases = $limitDepartmentPurchases;
    }

    /**
     * TODO: describe method 'getEmployees'
     *
     * @return array 
     */
    public function getEmployees() {
        return $this->employees;
    }

    /**
     * TODO: describe method 'setEmployees'
     *
     * @param array $employees 
     */
    public function setEmployees(array $employees) {
        $this->employees = $employees;
    }

    /**
     * TODO: describe method 'addEmployee'
     *
     * @param swzz_Employee $employee 
     */
    public function addEmployee(swzz_Employee $employee) {
        $this->employees[] = $employee;
    }

    /**
     * TODO: describe method 'removeEmployee'
     *
     * @param swzz_Employee $employee 
     */
    public function removeEmployee(swzz_Employee $employee) {
        $key = array_search($employee, $this->employees, true);

        if ($key !== false) {
            unset($this->employees[$key]);
        }
    }

} // end of class swzz_Department

?>